package me.yricky.hid.desktop

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import me.yricky.hid.desktop.mainnav.MainNav
import me.yricky.hid.desktop.mainnav.MainNavDebugTabs
import me.yricky.hid.desktop.mainnav.MainNavDeviceList
import me.yricky.hid.desktop.mainnav.MainNavHome
import me.yricky.usbhid.UsbHid

class AppState {
    val hid by lazy { UsbHid() }
    val ioScope = CoroutineScope(Dispatchers.IO)

    val mainNavHome = MainNavHome(this)
    val mainNavDeviceList = MainNavDeviceList(this)
    val mainNavDebugTabs = MainNavDebugTabs(this)

    var mainNav:MainNav by mutableStateOf(mainNavDeviceList)

}